< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03103450.xhp

(section: global) (bookmark: bm_id3159201)
Global statement

Global ステートメント

Global Statement [Runtime]
Global ステートメント [実行時](hd_id3159201.1)

Dimensions a variable or an array at the global level (that is, not within a subroutine or function), so that the variable and the array are valid in all libraries and modules for the current session.
変数や配列を (1 つのサブルーチンや関数内部に限定するのではなく) 大域レベルで定義し、現在のセッションにおけるすべてのライブラリやモジュールで使用可能にします。(par_id3149177.2)

(/section: global)

Syntax:
構文:(hd_id3143270.3)

Global VarName[(start To end)] [As VarType][, VarName2[(start To end)] [As VarType][,...]]
Global VarName[(start To end)] [As VarType][, VarName2[(start To end)] [As VarType][,...]](par_id3150771.4)

Example:
例:(hd_id3156152.5)

Global iGlobalVar As Integer
Global iGlobalVar As Integer(par_id3145315.6)

Sub ExampleGlobal
Sub ExampleGlobal(par_id3147531.7)

iGlobalVar = iGlobalVar + 1
iGlobalVar = iGlobalVar + 1(par_id3149670.8)

MsgBox iGlobalVar
MsgBox iGlobalVar(par_id3148552.9)

End sub
End sub(par_id3149457.10)


< Prev / Next >